<template>
  <div>
    <a @click="fn1" :href="url">阻止百度</a>
    <br>
    <a @click="fn2(10,$event)" :href="url">阻止去百度</a>
  </div>
</template>

<script>
export default {
  data() {
    return {
      url: 'http://www.baidu.com'
    }
  },
  methods: {
    fn1(e) {
      e.preventDefault()
    },
    fn2(num, e) {
      e.preventDefault()
    }
  }
}
</script>

<style>

</style>